package com.brillilab.domain.enums.common;

/**
 * 是否删除：0-否，1-是
 *
 * @author lj
 */
public enum IsDeleteEnum {

    NO("否", 0), YES("是", 1),NULLIFY("作废",2);
    public String key;
    private Integer value;

    private IsDeleteEnum(String key, Integer value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public static String getKey(Integer value) {
        for (IsDeleteEnum p : IsDeleteEnum.values()) {
            if (p.getValue().equals(value)) {
                return p.key;
            }
        }
        return null;
    }

    public Integer getValue() {
        return value;
    }

}
